package com.xuhuan.demo.pattern.decorator.coffee;

import com.xuhuan.demo.pattern.decorator.Drink;

/**
 * @author huan.xu
 * @date 2021/10/6 22:53
 * @description 咖啡
 */
public class Coffee extends Drink {

    /**
     * 抽象方法，计算价格
     *
     * @return
     */
    @Override
    public float cost() {
        return super.getPrice();
    }

    @Override
    public String getDescription() {
        return super.getDescription()+" "+super.getPrice();
    }
}
